import Core.WindFunctions as Wind
import Core.Gadget as Gadget
import DataProcess as DataProcess
import datetime

if __name__ == '__main__':
    #
    # ---Connect to DataBase, Find Series 连接数据库---
    from Core.Config import *
    pathfilename = os.getcwd() + "\..\Config\config2.json"
    config = Config(pathfilename)
    database = config.DataBase("JDMySQL")
    realtime = config.RealTime()

    Wind.w.start()
    # CheckProgress()
    real_datetime1 = datetime.datetime(2020,1,1)
    real_datetime2 = datetime.datetime(2020,12,31)
    DataProcess.Download_DailyBars(database, "510050.SH", instrument_type="Stock", begDateTime=real_datetime1, endDateTime=real_datetime2)
